package cn.highset.modules.base.service.mybatis;

import cn.highset.modules.base.entity.ProductType;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * @author Victor
 */
@CacheConfig(cacheNames = "productType")
public interface IProductTypeService extends IService<ProductType> {

    /**
     * 根据展商id获取数据
     *
     * @param exhibitorId
     */
    @Cacheable(key = "'exhibitor:'+#exhibitorId+':'+#levels")
    List<ProductType> findByExhibitorId(String exhibitorId,Integer levels);
}
